import gsap from "gsap";
import { ScrollTrigger } from "gsap/ScrollTrigger";
gsap.registerPlugin(ScrollTrigger);

import Manager from './Manager';
export default class scroll {
    scrollY = 0;
    currentSection = 0;
    constructor() {
        this.manager = new Manager()
        this.scrollY = window.scrollY;

        // window.addEventListener("scroll", () => {
        //     this.scrollY = window.scrollY;
            
        //     const newSection = Math.round(this.scrollY / this.manager.sizes.height);

        //     if (newSection != this.currentSection) {
        //         this.currentSection = newSection;

        //         gsap.to(this.manager.cube.sectionMeshes[this.currentSection].rotation, {
        //             duration: 1.5,
        //             ease: "power2.inOut",
        //             x: "+=6",
        //             y: "+=3",
        //             z: "+=1.5",
        //         });
        //     }
        // });
    }


}